//package com.ydkfjs.common;
//
//import cn.dev33.satoken.listener.SaTokenListenerForSimple;
//import cn.dev33.satoken.stp.SaLoginModel;
//import com.ydkfjs.service.IpService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//@Slf4j
//@Component
//public class MySaTokenListener extends SaTokenListenerForSimple {
//
//    private final IpService ipService;
//
//    public MySaTokenListener(IpService ipService) {
//        this.ipService = ipService;
//    }
//
//    /** 每次登录时触发 */
//    @Override
//    public void doLogin(String loginType, Object loginId, String tokenValue, SaLoginModel loginModel) {
//        log.info("监测到用户登录");
////        ipService.refreshIpDetailAsync((Long) loginId);
//
////        System.out.println("---------- 自定义侦听器实现 doLogin");
//    }
//}
